package rhc.spider.crawler;

import rhc.spider.downloader.Downloader;
import rhc.spider.engine.Engine;
import rhc.spider.engine.impl.NormalEngine;
import rhc.spider.middlewareManage.impl.DownloadMiddlewareManage;
import rhc.spider.middlewareManage.impl.ExtensionMiddlewareManage;
import rhc.spider.middlewareManage.impl.SpiderMiddlewareManage;
import rhc.spider.schedule.Schedule;
import rhc.spider.schedule.impl.NormalSchedule;
import rhc.spider.setting.Setting;
import rhc.spider.signal.SignalManage;
import rhc.spider.signal.signalManage.SignalManageImpl;
import rhc.spider.spider.Spider;

/**基础爬虫类
 * @author lenovo1
 *
 */
abstract public class BasicCrawler implements Crawler{
	
	protected Setting setting;
	
	protected Spider spider;
	
	protected Engine engine;
	
	protected SignalManageImpl signalManage;
	
	protected Downloader downloader;
	
	protected Schedule schedule;
	
	protected DownloadMiddlewareManage downloadMM;
	
	protected SpiderMiddlewareManage spiderMM;
	
	protected ExtensionMiddlewareManage extensionMM;
	
	public BasicCrawler(Setting setting){
		this.setting=setting;
		
		signalManage=new SignalManageImpl();
		downloadMM=new DownloadMiddlewareManage(this,setting);
		spiderMM=new SpiderMiddlewareManage(this,setting);
		extensionMM=new ExtensionMiddlewareManage(this,setting);
	}
	
	@Override
	public Setting getSetting() {
		// TODO 自动生成的方法存根
		return null;
	}
	
	@Override
	public Spider getSpider(){
		return spider;
	}
	
	@Override
	public void setSpider(Spider spider){
		this.spider=spider;
	}
	
	@Override
	public SignalManage getSignalManage(){
		return signalManage;
	}
	
	@Override
	public Schedule getSchedule(){
		return schedule;
	}
	
	@Override
	public void setSchedule(Schedule schedule){
		this.schedule=schedule;
	}
	
	@Override
	public Engine getEngine() {
		// TODO 自动生成的方法存根
		return null;
	}
	
	@Override
	public void setEngine(Engine engine) {
		// TODO Auto-generated method stub
		
	}
	
	@Override
	public DownloadMiddlewareManage getDownloadMiddlewareManage() {
		// TODO 自动生成的方法存根
		return null;
	}

	@Override
	public SpiderMiddlewareManage getSpiderMiddlewareManage() {
		// TODO 自动生成的方法存根
		return null;
	}

	@Override
	public ExtensionMiddlewareManage getExtensionMiddlewareManage() {
		// TODO 自动生成的方法存根
		return null;
	}
	
	@Override
	public void start() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void stop() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void pause() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void regain() {
		// TODO Auto-generated method stub
		
	}
}
